package com.homework02;

import java.util.Scanner;

/*
键盘录入一个三位数,请进行数值拆分，并将个位、十位、百位打印在控制台
*/
public class work05 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入三位数:");
        int number = sc.nextInt();
        int gewei = number % 10;
        int shiwei = (number / 10) % 10;
        int baiwei = number / 100;
        System.out.println("个位为:" + gewei);
        System.out.println("十位为:" + shiwei);
        System.out.println("百位为:" + baiwei);
    }
}
